package com.lx.sync.consumer.config;

import com.lx.sync.consumer.service.impl.CompositeSyncStateServiceImpl;
import com.lx.sync.core.service.SyncStateService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * 同步状态服务配置
 */
@Configuration
public class SyncStateConfig {
    
    /**
     * 配置组合实现的同步状态服务
     * 使用@Primary注解使其优先级高于默认实现
     */
    @Bean
    @Primary
    public SyncStateService syncStateService(CompositeSyncStateServiceImpl compositeSyncStateService) {
        return compositeSyncStateService;
    }
} 